﻿<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<script language="c#" runat="server">
protected string GetInstanceName(object instanceID)
{
	DataRow[] rows = Manager.Instances.Select(Alias.Instance.ID + "='" + instanceID + "'");
	if (rows.Length > 0)
		return rows[0][Alias.Instance.Name + PageLang].ToString();
	else
		return instanceID.ToString();
}
</script>
<section data-page="task_list" data-title="计划任务" data-lang="<%=ContentLang%>">
	<dl class="path1">
		<dt><span>您的位置：</span>计划任务</dt>
		<dd>
			<select data-class="<%=ContentLang%>Font" data-ali-widget="combo">
				<ali:List Object="Language" Source="Manager.Languages">
					<ali:Record>
						<%If Convert.ToString(Ab) == ContentLang%>
							<option value="<%=Ab%>" selected><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%Else%>
							<option value="<%=Ab%>"><%=[AliCMS.SystemModule.Alias.Language.Name + PageLang]%></option>
						<%EndIf%>
					</ali:Record>
				</ali:List>
			</select>
		</dd>
	</dl>
	<div class="ali-tabs sub-nav" data-height-style="fill" data-event="click">
		<div class="ali-tabs-header">
			<div class="ali-tabs-nav-container">
				<ul>
                    <li><a href="../data/list.aspx?Lang=<%=ContentLang%>" target="ali-navtab">数据备份</a></li>
                    <li class="ali-active"><a>计划任务</a></li>
                    <li><a href="../other.aspx?Lang=<%=ContentLang%>" target="ali-navtab">其他工具</a></li>
				</ul>				
			</div>
		</div>
		<div class="ali-tabs-body">
			<div class="ali-tabs-panel"></div>
			<div class="ali-tabs-panel">
				<div class="content">
					<table data-ali-widget="grid" class="grid1 ListTable">
						<thead>
                            <tr>
                                <th>名称</th>
                                <th>实例</th>
                                <th>对象</th>
                                <th>语言</th>
                                <th>操作</th>
                                <th>记录</th>
                                <th>定时定期</th>
                                <th>开始时间</th>
                                <th>删除</th>
                            </tr>
						</thead>
						<tbody>
                            <ali:List Object="Task" Validate="True">
                                <ali:Record>
                                    <tr data-id="<%=InnerID%>">
                                        <form>
                                            <td class="<%=ContentLang%>Font"><%=Name%></td>
                                            <td><%=GetInstanceName(InstanceID)%></td>
                                            <td><%=Object%></td>
                                            <td><%=Lang%></td>
                                            <td><%=Operation%></td>
                                            <td><%=[7]%></td>
                                            <td>
                                                <%If Convert.ToString(Every) == "Once"%>
                                                    定时
                                                <%ElseIf Convert.ToString(Every) == "Year"%>
                                                    每年
                                                <%ElseIf Convert.ToString(Every) == "Season"%>
                                                    每季
                                                <%ElseIf Convert.ToString(Every) == "Month"%>
                                                    每月
                                                <%ElseIf Convert.ToString(Every) == "Week"%>
                                                    每周
                                                <%ElseIf Convert.ToString(Every) == "Day"%>
                                                    每天
                                                <%ElseIf Convert.ToString(Every) == "Hour"%>
                                                    每小时
                                                <%ElseIf Convert.ToString(Every) == "Minute"%>
                                                    每分
                                                <%EndIf%>
                                            </td>
                                            <td><input type="text" name="StartTime" value="<%=StartTime%>" class="ali-input <%=ContentLang%>Font"></td>
                                            <td><a class="ali-button" data-operation="Delete">删除</a></td>
                                        </form>
                                    </tr>
                                </ali:Record>
                            </ali:List>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<div class="ali-tabs-bottom"><b></b></div>
	</div>
</section>